package maven.jyhs.com.proxy.dynamic;

import net.sf.cglib.proxy.Enhancer;

public class CglibProxyFactory {

    public static  <T> T createProxy(T target){
    Enhancer enhancer = new Enhancer();
    enhancer.setCallback(new CglibProxyInterceotor());
    enhancer.setSuperclass(target.getClass());
    return (T) enhancer.create();
    }
}
